package ExerciseOne;

public class SalariedEmployee extends Employee{

	private int monthSalary;//月工资

	public SalariedEmployee()
	{
		
	}
	
	public SalariedEmployee(String name,int number,Mydate birthday,int monthSalary) {
		super(name,number,birthday);
		this.monthSalary = monthSalary;
	}

	public int getMonthSalary() {
		return monthSalary;
	}

	public void setMonthSalary(int monthSalary) {
		this.monthSalary = monthSalary;
	}

	@Override//重写父类方法，返回月工资
	public double earnings() {
		return monthSalary;
	}

	@Override
	public String toString() {
		return "SalariedEmployee "+super.toString();
	}
	
}
